package com.puzzlebazar.client.main.model;

import com.puzzlebazar.client.util.TokenFactory;

public class AutoLink {

	private final String text;
	private final TokenFactory tokenFactory;

	/**
	 * Creates a link with its text and a factory to automatically
	 * update its history token.
	 * 
	 * @param text the hyperlink's text
	 * @param tokenFactory the factory that can create the token
	 */
	public AutoLink(String text, TokenFactory tokenFactory) {
		this.text = text;
		this.tokenFactory = tokenFactory;
	}

	/**
	 * @return The text of this link
	 */
	public String getText() {
		return text;
	}

	/**
	 * @return A token factory for this link
	 */
	public TokenFactory getTokenFactory() {
		return tokenFactory;
	}

	
}
